package com.mcf.xiaolinju.controller;


import com.mcf.xiaolinju.entity.Classify;
import com.mcf.xiaolinju.service.impl.ClassifyServiceImpl;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author mcf
 * @since 2022-02-26
 */
@CrossOrigin
@RestController
@RequestMapping("/xiaolinju/classify")
public class ClassifyController {
    @Resource
    ClassifyServiceImpl classifyService;
    //得到所有的分类
    @RequestMapping("/getall")
    public List<Classify>  getall(){
        return classifyService.getall();
    }

}
